﻿@model IEnumerable<WhiteGloss.Models.Image>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Artist
        </th>
        <th>
            Thumbnail
        </th>
        <th>
            Image
        </th>
        <th>
            Description
        </th>
        <th>
            CreatedDate
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Artist.Name)
        </td>
        <td>
            <a href="@item.Thumb">@Html.DisplayFor(modelItem => item.Thumb)</a>
        </td>
        <td>
            <a href="@item.Normal">@Html.DisplayFor(modelItem => item.Normal)</a>
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreatedDate)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ImageId }) |
            @Html.ActionLink("Details", "Details", new { id=item.ImageId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ImageId })
        </td>
    </tr>
}

</table>
